package org.exceptions;

import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;


public class MapException extends Exception {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public byte[] getBlankMap(){
		BufferedImage buffImg;
		ByteArrayOutputStream generated = new ByteArrayOutputStream();
		try {
			buffImg = ImageIO.read(new File("gfx/blankMap.png"));			
			ImageIO.write(buffImg, "png", generated);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return generated.toByteArray(); 
	}
}
